﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Domain.BomManage
{
    /// <summary>
    /// 生产工序
    /// </summary>
    [Table("Operation")]
    public class Operation : BaseEntity
    {
        /// <summary>
        /// 所属工艺路线Id
        /// </summary>
        public long RouteId { get; set; }

        /// <summary>
        /// 所属工艺路线
        /// </summary>
        public string? RouteName { get; set; }

        /// <summary>
        /// 工序顺序号
        /// </summary>
        public int Seq { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 设备Id（可选）
        /// </summary>
        public long? EquipmentId { get; set; }

        /// <summary>
        /// 标准工时（分钟）
        /// </summary>
        public decimal? StdTimeMinutes { get; set; }

        /// <summary>
        /// 工序参数（JSON）
        /// </summary>
        public string? ParametersJson { get; set; }
    }
}
